package com.yunxin.core.customer.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yunxin.core.admin.treeUtil.AdminOptionDTO;
import com.yunxin.core.customer.domain.CustomerInfoDetail;
import com.yunxin.core.customer.domain.CustomerMatchingProduct;
import com.yunxin.core.customer.domain.TagInfo;
import com.yunxin.core.wechat.domain.WechatTagInfo;
import com.yunxin.core.wechat.enumpack.AddWayEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
public class CustomerWechatInfoVo {


    @Schema(description = "系统客户id")
    private Integer customerId;

    @Schema(description = "客户编号")
    private String customerNo;

    @Schema(description = "企微头像")
    private String wechatAuatar;

    @Schema(description ="企微客户id")
    private Integer wechatCustomerId;

    @Schema(description = "微信添加时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date wechatAddTime;

    @Schema(description = "微信添加时间",hidden = true)
    private Long wechatCreatetime;

    @Schema(description = "最后一次微信聊天时间")
    private Date lastFollowTime;

    @Schema(description = "业务员id")
    private Integer salesmanId;

    @Schema(description = "业务员名称")
    private String salesmanName;

    @Schema(description = "话务员id")
    private Integer telephonerId;

    @Schema(description = "话务员名称")
    private String telephonerName;

    @Schema(description = "姓名")
    private String name;

    @Schema(description = "产品id")
    private Long productId;

    @Schema(description = "产品名")
    private String productName;

    @Schema(description = "手机号")
    private String phone;

    @Schema(description = "客户评分")
    private Integer grade;

    @Schema(description = "客户标签")
    private List<TagInfo> tagInfoId;

    @Schema(description = "客户描述")
    private String ctDescribe;

    @Schema(description = "系统客户来源")
    private Integer source;

    @Schema(description = "客户级别")
    private Integer level;

    @Schema(description = "企微客户标签id")
    private Long wechatInfoId;

    @Schema(description = "聊天间隔(分钟)")
    private String intervalDate;

    @Schema(description = "客户微信号")
    private String externalUserid;

    @Schema(description = "微信昵称")
    private String wechatName;

    @Schema(description = "微信最后一次聊天时间")
    private Date wechatLastTime;

    @Schema(description = "联系人的备注")
    private String remark;

    @Schema(description = "联系人的描述")
    private String description;

    @Schema(description = "客户添加方式")
    private Integer addWay;

    @Schema(description = "添加此客户添加方式")
    private String addWayStr;

    @Schema(description = "企业名称")
    private String corpName;


    @Schema(description = "企微客户标签")
    private List<WechatTagInfo> weChatTagInfo;

    @Schema(description = "团队id")
    private Integer teamId;

    @Schema(description = "团队名字")
    private String teamName;

    @Schema(description = "0-未知 1-男性 2-女性")
    private Integer wechatGender;

    @Schema(description = "该成员对此客户备注的手机号码")
    private String wechatRemarkMobiles;

    @Schema(description = "流失时间",hidden = true)
    private Long runTime;

    @Schema(description = "0未流失 1跟进人删除  2客户删除跟进人 3未知流失")
    private Integer runType;

    @Schema(description = "流失时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date runDate;

    @Schema(description = "跟进状态 0未跟进 1已跟进")
    private Integer followStatus;

    @Schema(description = "成单时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date makeOrderTime;

    @Schema(description = "企微标签id集合",hidden = true)
    private Object wechatTagIds;

//    @Schema(description = "标签名字")
//    private String tagNames;

    @Schema(description = "系统标签集合")
    private List<String> sysTags;

    @Schema(description = "企微标签集合")
    private List<String> wechatTags;

    @Schema(description = "分配产品情况")
    private List<CustomerMatchingProduct> customerMatchingProducts;

    @Schema(description = "客户详情")
    private CustomerInfoDetail customerInfoDetail;

    @Schema(description = "产品对接方式  1.自营 2.h5 3.API 4.企业微信 5微信公众号 6cps")
    private Integer abutmentType;

    public void setAddWay(Integer addWay) {
        this.addWay = addWay;
        this.addWayStr= AddWayEnum.getLabelByValue(addWay);
    }


}
